package com.qf.wangqing.sportsnews.bean;

import android.content.Intent;
import android.databinding.ObservableInt;
import android.view.View;

import com.google.gson.annotations.Expose;
import com.qf.wangqing.sportsnews.BR;
import com.qf.wangqing.sportsnews.R;
import com.qf.wangqing.sportsnews.adapter.recommendadapter.RDCommentPagerAdapter;

import java.util.List;

/**
 * Created by wuyang on 2016/12/19.
 */

public class RecommendBannersExtraEntity {
    private List<RecommendBannersEntity> banners ;

    public RecommendBannersExtraEntity(List<RecommendBannersEntity> banners) {
        this.banners = banners;
    }

    public List<RecommendBannersEntity> getBanners() {

        return banners;
    }

    public void setBanners(List<RecommendBannersEntity> banners) {
        this.banners = banners;
    }

    //设置viewpager页数变化的变量
    @Expose(serialize = false,deserialize = false)
    private ObservableInt currentPage = new ObservableInt(0);

    public ObservableInt getCurrentPage() {
        return currentPage;
    }

    @Expose(serialize = false,deserialize = false)
    private RDCommentPagerAdapter adapter;

    public RDCommentPagerAdapter getAdapter() {
        if (adapter == null) {
            adapter = new RDCommentPagerAdapter(banners, R.layout.rd_focus_image, BR.banners);
        }
        return adapter;
    }

}
